package top.ahzy.seobench.controller;

import cn.hutool.http.HttpStatus;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.ahzy.seobench.result.Result;
import top.ahzy.seobench.service.ExtendService;
import top.ahzy.seobench.sparkLite.SparkService;

import java.util.List;


@Api(tags = "扩展")
@RestController
@RequestMapping("/extend")
public class ExtendController {

    @Autowired
    ExtendService extendService;

    @Autowired
    SparkService sparkService;

    @PostMapping("/portScaner")
    @ApiOperation(value = "端口扫描", notes = "")
    public Result<List<Integer>> portScaner() {
        return new Result<>(HttpStatus.HTTP_OK, Result.success, extendService.portScaner());
    }

}
